Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable shadowing #266

Merged

Conversation

mccartney
Copy link
Collaborator

@mccartney mccartney commented Nov 25, 2019

VariableShadowing inspection has been previously implemented. I think it was because of huge amount of false positives it has never (?) been enabled. Fixing it.

Two major problems found (it took several evenings of nerve-racking debugging):

  • whenever there was a match, all the cases were visited twice (which for usual inspections is not a problem, but for this one it caused every variable within to report name conflict with itself)
  • blocks didn't create their own scope of variable names.

@mccartney mccartney merged commit 1ba4960 into scapegoat-scala:master Dec 10, 2019
@mccartney mccartney deleted the mccartney-variable-shadowing branch December 10, 2019 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant